﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using YasharEl.Infrastructure.EntityModel;

namespace YasharEl.Infrastructure.ProcessEngine
{
    [Serializable]
    public class ProcessStatus : Enumeration
    {
        #region TypeSafe Static Enumarations

        public static readonly ProcessStatus Active = new ActiveProcessStatus();
        public static readonly ProcessStatus Closed = new ClosedProcessStatus();
        public static readonly ProcessStatus Cancelled = new CancelledProcessStatus();

        #endregion

        #region Constructors

        protected ProcessStatus(int value, string shortName, string longName)
            : base(value, shortName, longName)
        {
        }

        protected ProcessStatus()
        {
        }

        #endregion

        #region Inner Classes - Type safe concrete enumarations.

        [Serializable]
        private class ActiveProcessStatus : ProcessStatus
        {
            public ActiveProcessStatus()
                : base(1, "Active", "Active Process Status")
            {

            }
        }

        [Serializable]
        private class ClosedProcessStatus : ProcessStatus
        {
            public ClosedProcessStatus()
                : base(2, "Closed", "Closed Process Status")
            {

            }
        }

        [Serializable]
        private class CancelledProcessStatus : ProcessStatus
        {
            public CancelledProcessStatus()
                : base(3, "Cancelled", "Cancelled Process Status")
            {

            }
        }

        #endregion
    }
}
